<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- checkbox的一个用法：只是单个checkbox，用来勾选同意或者不同意 -->
        <input type="checkbox" id="chk" v-model="chk"> <label for="chk">我同意本协议</label>

        <h2>请选择感兴趣的运动：</h2>
        <!-- 用法：勾选一堆感兴趣的内容 -->
        <input v-model="list" type="checkbox" value="basketball">篮球
        <input v-model="list" type="checkbox" value="paiqiu">排球
        <input v-model="list" type="checkbox" value="yumaoqiu">羽毛球
        <input v-model="list" type="checkbox" value="football">足球
    </div>

    <script src="./vue.js"></script>

    <script>
        new Vue({
            el: '#app',
            data() {
                return {
                    chk: true,
                    list: ['football','basketball']
                }
            },
        })
    </script>
</body>
</html>